package edu.sctu.xuping.month05.day20150512;

/**
 * Created by user16 on 2015/5/12.
 */
public class TextChild extends StudentsInformation implements JudgeInterface {
    public TextChild(TextOne[] array) {
        super(array);
        getSysyTem();
    }

    public int m = 0;
    public int n = 0;

    @Override
    public void getSysyTem() {
        for (int i = 0; i < array.length; i++) {
            if (array[i].getGrade() > 60) {
                System.out.println(array[i].name);
                m++;
            }
        }
        System.out.println("人数" + m);
        System.out.println("分数大于grade的人数及信息：");
    }

    @Override
    public void judgeAge(int age, int grade) {
        for (int i = 0; i < array.length; i++) {

            if (array[i].getGrade() > grade) {
                System.out.println(array[i].getName() + array[i].getGrade() + array[i].getNumber() + array[i].getAddress());
                n++;
            }
        }
        System.out.println("分数大于grade的人数共有：" + n + "人");
    }
}
